<!DOCTYPE html>
<html  xmlns:th="http://www.thymeleaf.org">

    <head th:replace="fragments :: head(~{::title})">
        <Title>归档</Title>
    </head>

    <body>
        <!-- 导航 -->
        <nav th:replace="fragments::menu(4)"></nav>

        <!--中间内容-->
        <div class="me-padded-tb-large m-container-small">
            <div class="ui container">
                <!-- header -->
                <div class="ui top teal attached segment padded">
                    <div class="ui two column grid middle aligned">
                        <div class="column">
                            <h3 class="ui header teal">归档</h3>
                        </div>
                        <div class="right aligned column">
                            共 <h3 class="ui header orange
                                   me-inline-block" th:text="${counts}">14</h3> 篇博客
                        </div>
                    </div>
                </div>

                <th:block th:each="item : ${archiveMap}">
                    <h3 class="ui center aligned header" th:text="${item.key}">2020</h3>
                    <div class="ui fluid vertical menu">
                        <a href="#" th:href="@{/blogs/{id}(id=${blog.id})}"  class="item" th:each="blog : ${item.value}">
          <span>
            <i class="mini teal circle icon"></i><span th:text="${blog.title}">标题</span>
            <div class="ui teal basic left pointing label m-padded-mini " th:text="${#dates.format(blog.updateTime,'MMMdd')}">9月03</div>
          </span>
                            <div class="ui orange basic left pointing label m-padded-mini " th:text="${blog.flag.length()}!=0?${blog.flag}:'原创'">原创</div>
                        </a>
                    </div>
                </th:block>

            </div>
        </div>

        <!-- 底部栏 -->
        <footer th:replace="fragments::footer"></footer>

        <!-- 引入js脚本 -->
        <!--/*/<th:block th:replace="fragments :: script">/*/-->
        <!--/*/</th:block>/*/-->
        <script>
            // 手机端点击显示导航栏
            $(".menu.toggle").click(function () {
                $(".me-item").toggleClass("me-mobile-hide");
            });
        </script>
    </body>
</html>